<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/14 014
 * Time: 11:46
 */
namespace App\NewPizza;

class ClamPizza extends Pizza
{
    public $ingredientFactory;

    public function __construct(PizzaIngredientFactory $ingredientFactory)
    {
        $this->ingredientFactory = $ingredientFactory;
    }

    public function prepare()
    {
        // TODO: Implement prepare() method.
        echo ("Preparing " . $this->name . "<br />");
        $this->dough = $this->ingredientFactory->createDough();
        $this->sauce = $this->ingredientFactory->createSauce();
        $this->cheese = $this->ingredientFactory->createCheese();
        $this->clam = $this->ingredientFactory->createClam();
    }
}